const mdEdit = require('../../modules/mdEdit')


module.exports = (req, res) => {
  if (!req.body.user_name || !req.body.user_id || !req.body.title || !req.body.label || !req.body.content || !req.body.createTime) {
    return res.status(200).json({msg:'参数错误',code: 400})
  }
  mdEdit.getMd(req.body).then(suc => {
    res.status(200).json({msg: '发表成功', code: 200})
  }).catch(err => {
    console.log(err)
    res.status(200).json({msg: '服务器返回错误，请稍后再试', code: 500})
  })
}